|
SET VECTOR3 TO PARTICLES POSITION
This command will set the vector3 data using the X, Y and Z coordinates from the specified particles position.
SET VECTOR3 TO PARTICLES POSITION Vector, Particle Number
Vector
Integer
The vector number
Particle Number
Integer
The particle number
This command does not return a value.
load image "snow.bmp",1
load image "spec.bmp",3
make snow particles1, 1, 500,-5,5,5, 10,10,10
make particles 3, 3, 10, 10.0
position particles 3, -3, 0, 10
result=make vector3(1)
set vector3 1, -3, 0, 10
position particles 3, 1
set vector3 1, 0, 0, 45
rotate particles 3, 1
set vector3 to particles position 1, 3
rot#=z vector3(1)
result=delete vector3(1)
position camera 0,1,0
point camera 0,1,400
while mouseclick()=0
if upkey()=1 then move camera 0.1
if downkey()=1 then move camera -0.1
if leftkey()=1 then turn camera left 1
if rightkey()=1 then turn camera right 1
rot#=wrapvalue(rot#+1.0)
color particles 3, rnd(255), rnd(255), rnd(255)
position particles 3, (mousex()-320)/50.0, 0, 10
rotate particles 3, 0, 0, rot#
sync
endwhile
delete particles 1
delete particles 3
end
PARTICLES Commands Menu
Index
|